<Select Style="width:240px"
        Placeholder="custom dropdown render"
        DropdownRender="@OnDropdownRender">
    @foreach (var item in _items)
    {
        <SelectOption Value="@item">@item</SelectOption>
    }
</Select>

@code{
    private int _index = 0;
    private string _name = "";
    private List<string> _items = new List<string> { "jack", "lucy" };

    private void AddItem(MouseEventArgs args)
    {
        Console.WriteLine("Add item");
        _name = null;
        var newItem = !string.IsNullOrWhiteSpace(_name) ? _name : $"New Item {_index++}";
        _items.Add(newItem);
    }

    private RenderFragment OnDropdownRender(RenderFragment originNode, Properties props)
    {
        RenderFragment customDropdownRender =
        @<Template>
            <div>
                @originNode
                <Divider Style="margin:4px 0"></Divider>
                <div style="display:flex;flex-wrap:nowrap;padding:8px">
                    <Input Style="flex:auto" @bind-Value="@_name"/>
                    <a style="flex:none;padding:8px;display:block;cursor:pointer" @onclick="AddItem">
                        <Icon Type="plus" Theme="outline"></Icon>
                        Add Item
                    </a>
                </div>
            </div>
        </Template>;
        return customDropdownRender;
    }
}
